home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / cookie / nsIPermission.h < prev   
C/C++ Source or Header  |  2006-05-08  |  4KB  |  132 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPermission.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPermission_h__
  6. #define __gen_nsIPermission_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIPermission */
  19. #define NS_IPERMISSION_IID_STR "28f16d80-157b-11d5-a542-0010a401eb10"
  20.  
  21. #define NS_IPERMISSION_IID \
  22.   {0x28f16d80, 0x157b, 0x11d5, \
  23.     { 0xa5, 0x42, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }}
  24.  
  25. /**
  26.  * This interface defines a "permission" object,
  27.  * used to specify allowed/blocked objects from
  28.  * user-specified sites (cookies, images etc).
  29.  */
  30. class NS_NO_VTABLE nsIPermission : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPERMISSION_IID)
  34.  
  35.   /**
  36.      * The name of the host for which the permission is set
  37.      */
  38.   /* readonly attribute AUTF8String host; */
  39.   NS_IMETHOD GetHost(nsACString & aHost) = 0;
  40.  
  41.   /**
  42.      * a case-sensitive ASCII string, indicating the type of permission
  43.      * (e.g., "cookie", "image", etc).
  44.      * This string is specified by the consumer when adding a permission 
  45.      * via nsIPermissionManager.
  46.      * @see nsIPermissionManager
  47.      */
  48.   /* readonly attribute ACString type; */
  49.   NS_IMETHOD GetType(nsACString & aType) = 0;
  50.  
  51.   /**
  52.      * The permission (see nsIPermissionManager.idl for allowed values)
  53.      */
  54.   /* readonly attribute PRUint32 capability; */
  55.   NS_IMETHOD GetCapability(PRUint32 *aCapability) = 0;
  56.  
  57. };
  58.  
  59. /* Use this macro when declaring classes that implement this interface. */
  60. #define NS_DECL_NSIPERMISSION \
  61.   NS_IMETHOD GetHost(nsACString & aHost); \
  62.   NS_IMETHOD GetType(nsACString & aType); \
  63.   NS_IMETHOD GetCapability(PRUint32 *aCapability); 
  64.  
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  66. #define NS_FORWARD_NSIPERMISSION(_to) \
  67.   NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \
  68.   NS_IMETHOD GetType(nsACString & aType) { return _to GetType(aType); } \
  69.   NS_IMETHOD GetCapability(PRUint32 *aCapability) { return _to GetCapability(aCapability); } 
  70.  
  71. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  72. #define NS_FORWARD_SAFE_NSIPERMISSION(_to) \
  73.   NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
  74.   NS_IMETHOD GetType(nsACString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  75.   NS_IMETHOD GetCapability(PRUint32 *aCapability) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCapability(aCapability); } 
  76.  
  77. #if 0
  78. /* Use the code below as a template for the implementation class for this interface. */
  79.  
  80. /* Header file */
  81. class nsPermission : public nsIPermission
  82. {
  83. public:
  84.   NS_DECL_ISUPPORTS
  85.   NS_DECL_NSIPERMISSION
  86.  
  87.   nsPermission();
  88.  
  89. private:
  90.   ~nsPermission();
  91.  
  92. protected:
  93.   /* additional members */
  94. };
  95.  
  96. /* Implementation file */
  97. NS_IMPL_ISUPPORTS1(nsPermission, nsIPermission)
  98.  
  99. nsPermission::nsPermission()
  100. {
  101.   /* member initializers and constructor code */
  102. }
  103.  
  104. nsPermission::~nsPermission()
  105. {
  106.   /* destructor code */
  107. }
  108.  
  109. /* readonly attribute AUTF8String host; */
  110. NS_IMETHODIMP nsPermission::GetHost(nsACString & aHost)
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* readonly attribute ACString type; */
  116. NS_IMETHODIMP nsPermission::GetType(nsACString & aType)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120.  
  121. /* readonly attribute PRUint32 capability; */
  122. NS_IMETHODIMP nsPermission::GetCapability(PRUint32 *aCapability)
  123. {
  124.     return NS_ERROR_NOT_IMPLEMENTED;
  125. }
  126.  
  127. /* End of implementation class template. */
  128. #endif
  129.  
  130.  
  131. #endif /* __gen_nsIPermission_h__ */
  132.